/**
 * 
 */
package org.softTank.BC.ws.client;

import net.sf.json.JSONObject;

/**
 * @author Yuzone
 *
 */
public class UddiQueryClient {

	private GisServicePortType service;
	public UddiQueryClient() {
		service = new GisService().getGisServiceHttpPort();
	}

	public String queryAll() {
		return service.findServices("");
	}

	public String queryByName(String value) {
		JSONObject param = new JSONObject();
		param.put("name", value);

		return service.findServices(param.toString());
	}

	public String queryByServiceType(String value) {
		JSONObject param = new JSONObject();
		param.put("serviceType", value);

		return service.findServices(param.toString());
	}

	public String queryAssem(String name, String serviceType) {
		JSONObject param = new JSONObject();
		param.put("name", name);
		param.put("serviceType", serviceType);

		return service.findServices(param.toString());
	}
}
